# filenames = ['cats.txt', 'dogs.txt']
# for filename in filenames:
#     try:
#         with open(filename) as file_object:
#             contents = file_object.read()
#             print(contents.rstrip())
#     except FileNotFoundError:
#         print(f"抱歉，文件 {filename} 不存在呀，请检查一下哦。")


filenames = ['cats.txt', 'dogs.txt']
for filename in filenames:
    try:
        with open(filename) as file_object:
            contents = file_object.read()
            print(contents.rstrip())
    except FileNotFoundError:
        pass